//
//  AudioPlay.h
//  client
//
//  Created by DuanHongbo on 15/9/10.
//
//

#ifndef __client__AudioPlay__
#define __client__AudioPlay__

#include "cocos2d.h"

using namespace cocos2d;

class AudioPlay : public ActionInterval
{
public:
    static AudioPlay* create(float d, const std::string& file );
protected:
    AudioPlay();
    virtual ~AudioPlay();
    
    bool initWithDuration(float d, const std::string& file);
    
    virtual void startWithTarget(Node *pTarget);
    virtual void update(float time);
    virtual void stop(void);
    
protected:
    std::string _audioFile;
    int _audioId;
};

#endif /* defined(__client__AudioPlay__) */
